<include file="Public/head"/>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="cf">
                            <form class="form-inline" action="" method="get">
                                <label class="inline">审核状态</label>
                                <select name="status" class="form-control">
                                    <option value="">--全部--</option>
                                    <option value="1" <if condition="$status eq 1">selected</if>>--待审核--</option>
                                    <option value="2" <if condition="$status eq 2">selected</if>>--已通过--</option>
                                    <option value="3" <if condition="$status eq 3">selected</if>>--已拒绝--</option>
                                </select>
                                <label class="inline">提现日期</label>
                            	<input class="form-control" id="tx_date" name="tx_date" value="{:I('tx_date')}"/>
                                <label class="inline">关键字</label>
                                <input type="text" name="keyword" value="{:I('keyword')}" placeholder="提现人" class="form-control">
                                <button type="submit" class="btn btn-purple btn-sm">
                                    <span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
                                    搜索
                                </button>
                            </form>
                        </div>
                        <div class="space-4"></div>
                            <table class="table table-striped table-bordered" id="dowebok">
                                <thead>
                                <tr>
                                    <th>提现金额</th>
                                    <th>实际打款</th>
                                    <th class="<if condition="$field eq 'nickname'">sorting_{$sort}<else/>sorting</if> sort_tag" field="nickname">提现人</th>
                                    <th>打款账户信息</th>
                                    <th>状态</th>
									<th>已提现</th>
									<th>邀请奖励</th>
									<th>登录次数</th>
									<th>充值点击次数</th>
									<th>提现点击次数</th>
									<th>账户余额</th>
									<th class="<if condition="$field eq 't'">sorting_{$sort}<else/>sorting</if> sort_tag" field="t">提现时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <empty name="list">
                                	<tr>
                                		<td colspan="8" style="text-align:center;">暂时没有数据</td>
                                	</tr>
                                <else/>
                                	<volist name="list" id="vo">
                                    <tr>
                                        <td>{$vo['tixian_money']}</td>
                                        <td>{$vo['final_money']}</td>
                                        <td>{$vo['nickname']}</td>
                                        <td>
                                       <!-- <if condition="$vo['account_type'] eq 1">
                                        	银行卡信息<br>
                                        	开户行：{$vo['payment']['kaihuhang']}<br>
                                        	支行：{$vo['payment']['zhihang']}<br>
                                        	姓名：{$vo['payment']['real_name']}<br>
                                        	卡号：{$vo['payment']['card_no']}
                                        </if> -->
                                        <if condition="$vo['account_type'] eq 2">
                                        	微信收款信息<br>
                                        	微信号：{$vo['payment']['wechat_no']}<br>
                                        	收款码：<img src="{$vo['payment']['wechat_qrcode']}" data-original="{$vo['payment']['wechat_qrcode']}" alt="{$vo['nickname']}微信收款码" width="120" height="120"/>
                                        </if>
                                        <if condition="$vo['account_type'] eq 3">
                                        	支付宝收款信息<br>
                                        	账户：{$vo['payment']['alipay_no']}<br>
                                        	收款码：<img src="{$vo['payment']['alipay_qrcode']}" data-original="{$vo['payment']['alipay_qrcode']}" alt="{$vo['nickname']}支付宝收款码" width="120" height="120"/>
                                        </if>
                                        </td>
                                        <td>
                                        	<if condition="$vo['status'] eq 1">待审核</if>
                                        	<if condition="$vo['status'] eq 2">已通过</if>
                                        	<if condition="$vo['status'] eq 3">已拒绝</if>
                                        </td>
										<td>{$vo['tixian_income']}</td>
										<td>{$vo['money_invite']}</td>
										<td>{$vo['count']}</td>
										<td>{$vo['mylevel_num']}</td>
										<td>{$vo['cash_num']}</td>
										<td>{$vo['money']}</td>
										<td>{$vo.t|date='Y-m-d H:i:s',###}</td>
                                        <td>
                                        <if condition="$vo['status'] eq 1">
                                        <!-- <a href="{:U('shenhe',array('id'=>$vo['id'],'p'=>$p,'status'=>2))}" onclick="if(!confirm('确定通过审核操作？操作后不可更改！')){return false;}">通过</a>&nbsp;&nbsp;&nbsp;
                                        <a href="{:U('shenhe',array('id'=>$vo['id'],'p'=>$p,'status'=>3))}" onclick="if(!confirm('确定通过审核操作？操作后不可更改！')){return false;}">驳回</a> -->
										<!-- <a href="javascript:;" onclick="updateShenhe('{$vo['id']}')">驳回</a> -->
										<!-- <a href="{:U('updateShenhe',array('id'=>$vo['id'],'p'=>$p,'status'=>$status))}">审核</a> -->
										<a href="javascript:;" onclick="updateShenhe('{$vo['id']}')">审核</a>
                                        <else/>
                                        <a href="{:U('audit',array('id'=>$vo['id'],'p'=>$p))}">查看</a>
                                        </if>
                                        </td>
                                    </tr>
                                </volist>
                                </empty>
                                </tbody>
                            </table>
                            {$page}
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script type="text/javascript">
	$(function(){
		$('#tx_date').datepicker({
            format: 'yyyy-mm-dd',
            weekStart: 1,
            autoclose: true,
            todayBtn: 'linked',
            language: 'cn'
        });
		//table排序
		$(".sort_tag").each(function(){
			var th = $(this),thIndex = th.index(),inverse = true;
			th.click(function(){
				var tag = $(this).attr("class");
				tag = tag.substring(0,tag.indexOf(" "));
				if(tag=='sorting_asc'){
					sortTable($(this).attr("field"),"desc");
				}else if(tag=='sorting_desc'){
					sortTable($(this).attr("field"),"asc");
				}else if(tag=='sorting'){
					sortTable($(this).attr("field"),"asc");
				}
				
			});
		});
	});
    var viewer = new Viewer(document.getElementById('dowebok'), {
		url: 'data-original'
	});
    function sortTable(field,sort){
    	var tx_date = "{:I('tx_date')}";
    	var status = "{$status}";
    	var keyword = "{:I('keyword')}";
    	location.href = "{:U('index')}?field="+field+"&sort="+sort+"&tx_date="+tx_date+"&status="+status+"&keyword="+keyword;
    }
	function updateShenhe(uid){
		layer.open({
	  		  type: 2, 
	  		  shade:0.1, 
	  		  area:['400px','220px'], 
	  		  title:'提现审核',
	  		  content: "{:U('updateShenhe')}?uid="+uid,
	  		  cancel: function(index, layero){
	  		        layer.close(index);
	  		        location.reload();
	  		  }
	  		});
	}
</script>
</body>
</html>
